package com.wowangz.cms.component.datagrid.pojo;

public class DataGrid {

	private long startrow = -1;
	private long endrow = -1;
	private String sort = "";
	private String order = "";
	private String sql = "";
	private long datatype = 1 ; //数据库类型 1：ORACLE , 2: MYSQL
	private long rows = 10 ; //默认显示分页条数
    
    public void setPangingParam(PangingParam pangingParam){
		this.startrow = (pangingParam.getPage() - 1) * pangingParam.getRows();
		this.endrow = this.startrow +  pangingParam.getRows();
		this.sort = pangingParam.getSort();
		this.order = pangingParam.getOrder();
		this.rows  = pangingParam.getRows();
    }

	public long getStartrow() {
		return startrow;
	}

	public void setStartrow(long startrow) {
		this.startrow = startrow;
	}

	public long getEndrow() {
		return endrow;
	}

	public void setEndrow(long endrow) {
		this.endrow = endrow;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public long getDatatype() {
		return datatype;
	}

	public void setDatatype(long datatype) {
		this.datatype = datatype;
	}

	public long getRows() {
		return rows;
	}

	public void setRows(long rows) {
		this.rows = rows;
	}
	
}
